
package ru.cod.rs.interfaces.impl;

import java.util.List;
import ru.cod.rs.interfaces.Input;
import ru.cod.rs.interfaces.TouchHandler;
import android.view.View;

public class InputImpl implements Input {
    
    private TouchHandler touchHandler;
    
    public InputImpl(View v, float sX, float sY) {
    
        touchHandler = new SingleTouchHandler(v, sX, sY);
        
    }
    
    @Override
    public boolean isTouchDown(int pointer) {
    
        return touchHandler.isTouchDown(pointer);
    }
    
    @Override
    public int getTouchX(int pointer) {
    
        return touchHandler.getTouchX(pointer);
    }
    
    @Override
    public int getTouchY(int pointer) {
    
        return touchHandler.getTouchY(pointer);
    }
    
    @Override
    public List<TouchEvent> getTouchEvents() {
    
        return touchHandler.getTouchEvents();
    }
    
}
